/* Universal Styles - Keep these at the very top */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Base Product Card Styles */
.product-card {
  width: 100%;
  max-width: 300px;
  background: var(--text-light);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s;
  position: relative;
  cursor: pointer;
  margin: 15px;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-link {
  text-decoration: none;
  color: inherit;
  display: block;
  padding-bottom: 0px;
}

/* Badge Styles */

.discount-badge, .out-of-stock-badge, .low-stock-badge, .delivery-badge {
  font-size: 12px;
  font-weight: bold;
  display: inline-block;
  margin: 10px;
  border-radius: 4px;
  position: absolute;
  top: 0;
  z-index: 1;
  padding: 5px 10px;
}

.discount-badge {
  background-color: var(--accent-color);
  color: var(--text-light);
  left: 0;
}

.delivery-badge {
  background-color: var(--primary-color); /* Green color for free delivery */ 
  color: var(--text-light);
  right: 0;
}

.out-of-stock-badge {
  background-color: #ef4444;
  color: var(--text-light);
  left: 0;
}

/* Product Image */
.product-img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  padding: 5px;
  background-color: #f9f9f9;
}

/* Product Info Section */
.product-info {
  padding: 15px;
}

/* Product Title - General Style */
.product-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-black); /* Base color for desktop */
}

/* Product Review */
.product-review {
  color: var(--review); 
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
}

.review-count {
  color: var(--review-count); 
  font-size: 12px;
  margin-left: 5px;
}

/* Product Price - General Styles */
.product-price {
  margin-bottom: 10px;
}

.original-price {
  text-decoration: line-through;
  color: #999; /* Base color for desktop */
  font-size: 14px;
}

.current-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--accent-color); /* Base color for desktop */
}

/* Color Availability */
.color-availability {
  display: flex;
  gap: 6px;
  margin: 10px 15px;
}

.color-circle, .color-option {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--boder);
  position: relative;
  cursor: pointer;
}

.out-of-stock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  border-radius: 50%;
}


/* Products Container */
.products-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

/* Mobile devices (max-width: 767px) */
@media (max-width: 767px) {
  .products-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 0 10px;
  }

  .product-card {
    max-width: none;
  }

  .product-img {
    height: 250px; /* Increased from 120px to make it a bit bigger for regular mobile */
    padding: 8px;
  }

  .product-info {
    padding: 10px;
  }

  .product-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .current-price {
    font-size: 18px; 
  }

  .original-price {
    font-size: 14px;
  }

  .action-buttons {
    padding: 8px; 
  }

    .discount-badge,
    .out-of-stock-badge,
    .low-stock-badge,
    .delivery-badge {
      font-size: 11px; /* Smaller badges */
      padding: 3px 8px;
      margin: 5px;
    }
}

/* Extra small mobile devices (max-width: 480px) */
@media (max-width: 480px) {

    .product-img {
      height: 165px;
      padding: 5px;
    }


  .product-title {
    font-size: 14px; 
  }


  .product-review {
    font-size: 12px; 
  }

  .color-availability {
    margin: 5px 0; 
  }
}

